package com.jxx.controller;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jxx.pojo.Category;
import com.jxx.service.CategoryService;
import com.jxx.util.ObjectMapperUtil;
import com.jxx.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/category/")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    /**
     * @author Lzw
     * @desc 主页面商品分类展示
     * @return List<Category>
     * @date 2020年11月26日23:30:35
     */
    @RequestMapping("showCategory")
    public List<Category> showCategory(){
        List<Category> list = categoryService.showCategory();
        return list;

    }



}
